<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="../../dist/css/skins/all-skins.css">
    <!--地图适配-->
    <link rel="stylesheet" href="../../dist/css/index.css">
    <title>犬运动轨迹统计图</title>
    <script src="../../plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="https://webapi.amap.com/maps?v=1.4.15&key=39f6a5bd38f3167dc032e09b8e6d2a12"></script>
    <script src="https://webapi.amap.com/loca?v=1.3.0&key=39f6a5bd38f3167dc032e09b8e6d2a12"></script>
    <link rel="stylesheet" type="text/css" href="../../DataTables/DataTables-1.10.18/css/jquery.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="../../DataTables/Buttons-1.5.4/css/buttons.dataTables.min.css">
    <script type="text/javascript" src="../../DataTables/DataTables-1.10.18/js/jquery.dataTables.js"></script>

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        @media (max-width: 768px) {
            .cc_from_item{
                width:100% !important;
            }

        }
        body,html,#container{
            height: 100%;
            margin: 0px;
            font:12px Arial;
        }
        .taiwan{
            border: solid 1px red;
            color: red;
            float: left;
            width: 50px;
            background-color: rgba(255,0,0,0.1)
        }
    </style>
    <script src="../../bootstrap/js/bootstrap.js"></script>
</head>
<body>
    <div class="row" style="padding-top: 20px;margin-top: 20px">
        <div class="col-md-12">
            <div class="box-body">
                <form role="form">
                    <!-- text input -->
                    <div class="form-group  has-success select-5">
                        <style>
                            @media (min-width: 992px){
                                .select-5 .form-control{
                                    width:18%;
                                    margin-left:15px;
                                }
                            }

                        </style>
                        <label style="padding-bottom: 5px">所属区域(*)</label>
                        <div class="row">
                            <select id="select_province" class="form-control col-md-2" style="margin-bottom: 5px">
                                <!--<option value="-1">请选择</option>-->
                                <option value="0" style="color: #00a65a">全国</option>
                                <option value="150000000000">内蒙古自治区</option>
                                <option value="510000000000">四川省</option>
                                <option value="530000000000">云南省</option>
                                <option value="540000000000">西藏自治区</option>
                                <option value="610000000000">陕西省</option>
                                <option value="620000000000">甘肃省</option>
                                <option value="630000000000">青海省</option>
                                <option value="640000000000">宁夏回族自治区</option>
                                <option value="650000000000">新疆维吾尔族自治区</option>
                                <option value="660000000">建设兵团</option>
                            </select>
                            <select id="select_city" class="form-control col-md-2" style="margin-bottom: 5px">
                                <option value="-1">请选择</option>
                            </select>
                            <select id="select_county" class="form-control col-md-2" style="margin-bottom: 5px"><option value="-1">请选择</option></select>
                            <select id="select_village" class="form-control col-md-2" style="margin-bottom: 5px"><option value="-1">请选择</option></select>
                            <select id="select_hamlet" class="form-control col-md-2" style="margin-bottom: 5px"><option value="-1">请选择</option></select>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="box-body">
            <div class="col-md-12">
                <div class="row">
                    <div class="col-md-4" style="margin-bottom:5px;margin-left: 3px">
                        <span class="col-md-8" style="padding-left: 5px;padding-right: 0;">
                            <input type="text" class="form-control" placeholder="请选择项圈"  id="input_neckletid" disabled/>
                        </span>
                        <span class="col-md-3">
                            <button type="button" id="btn_neckletlist" class="btn btn-info btn-flat">批量选择项圈</button>
                        </span>
                    </div>
                    <div class="col-md-6 cc_from_item" style="margin-bottom:5px;width:500px;">
                        起止时间:
                        <input id="input_begintime" class="form-control cc_from_item" style="display:inline-block;width: 200px;" type="datetime-local" value="2019-06-23T00:00"/>
                    <span style="display:inline-block;">-</span>
                        <input id="input_endtime" class="form-control cc_from_item" style="display:inline-block;width:200px;" type="datetime-local" value="2019-06-24T10:00"/>
                    </div>
                    <div class="col-md-2" style="padding-right: 0;">
                        <span class="col-md-8" style="padding-left: 0;">
                            <button type="button" id="a_getdogstalist" class="btn btn-info btn-flat">绘制活动地图</button>
                        </span>
                        <span class="col-md-3">
                            <button type="button" id="btn_stanum" class="btn btn-info btn-flat">统计</button>
                        </span>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <div class="content">
        <div id="pad-wrapper" class="users-list">
            <div class="row chart">
                <div class="col-md-12">
                    <div style="text-align: center;">
                        <h4 id="h3_logtitle"></h4>
                    </div>
                    <div id="statsChart" style="height:750px"></div>
                </div>
            </div>
        </div>
        <div id="dogid" style="display: none">0</div>
        <div class="modal fade" id="dogInfoDiv" tabindex="-1" role="dialog">
            <div class="modal-dialog model80" >

                <div class="modal-content">
                    <div class="modal-body">
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <div class="modal fade" id="doglist" tabindex="-1" role="dialog">
            <div class="modal-dialog model80" >

                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">信息详情</h4>
                    </div>
                    <div class="modal-body">
                        <form role="form">
                            <table data-toggle="table" class="table  table-bordered" id="datatable" style="table-layout:fixed;">
                                <thead>
                                <tr>
                                    <th><input type="checkbox" name="select_all" id="select-all" class="select-all"></th>
                                    <th>犬主姓名</th>
                                    <th>犬名</th>
                                    <th>犬只政府编码</th>
                                    <th>项圈编号</th>
                                </tr>
                                </thead>
                                <tbody id="tbody">

                                </tbody>
                            </table>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-primary" onclick="choosedog()" type="button">
                            选择
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </div>
    <script type="text/javascript">
        var viewdata;
        var necnum = 0;
        var posnum = 0;
        $(function () {
            var datares = {};
            // $.ajax({
            //     url: "/aidog/api/register/4",
            //     async:false,
            //     type: "GET",
            //     success: function (data) {
            //         datares = eval("(" + data + ")");
            //     }
            // });
            $.getJSON ("/aidog/adminlte/pages/ui_js/district.json", function (data)
            {
                datares = data;
            });

            //日历控件
            var date2 = new Date();
            date2.setDate(new Date().getDate() - 30);
            $("#input_endtime").val(timetrans((new Date()).valueOf()));
            $("#input_begintime").val(timetrans(date2));


            var districtcode = "";
            var level = "";
            $("#select_province").on('change', function () {
                districtcode = $(this).find('option:selected').val();
                // if(districtcode == "0"){
                //     $("#select_city").attr("disabled","disabled");
                //     $("#select_county").attr("disabled","disabled");
                //     $("#select_village").attr("disabled","disabled");
                //     $("#select_hamlet").attr("disabled","disabled");
                // }else{
                //
                // }
                level = "province";
                var selectvalue = $(this).find('option:selected').val();
                selectvalue = selectvalue.substring(0,2);
                $("#select_city").find("option").remove();
                var select_city = document.getElementById("select_city");
                select_city.options.add(new Option("请选择", "-1"));
                if ($('#modalselect_adminlevel').find('option:selected').text()!="省级") {
                    for (var i = 0; i < datares.data1.length; i++) {
                        if (datares.data1[i].districtcode.toString().substring(0, 2) == selectvalue) {
                            //遍历后台传回的结果，一项项往select中添加option
                            select_city.options.add(new Option(datares.data1[i].districtname, datares.data1[i].districtcode));
                        }
                    }
                }
                $("#select_county").find("option").remove();
                var select_county = document.getElementById("select_county");
                select_county.options.add(new Option("请选择", "-1"));

                $("#select_village").find("option").remove();
                var select_village = document.getElementById("select_village");
                select_village.options.add(new Option("请选择", "-1"));

                $("#select_hamlet").find("option").remove();
                var select_hamlet = document.getElementById("select_hamlet");
                select_hamlet.options.add(new Option("请选择", "-1"));
            });
            $("#select_city").on('change', function () {
                districtcode = $(this).find('option:selected').val();
                level = "city";
                var selectvalue = $(this).find('option:selected').val();
                $("#select_county").find("option").remove();
                selectvalue = selectvalue.substring(0, 4);
                var select_county = document.getElementById("select_county");
                select_county.options.add(new Option("请选择", "-1"));
                if ($('#modalselect_adminlevel').find('option:selected').text() != "市级") {
                    for (var i = 0; i < datares.data2.length; i++) {
                        if (datares.data2[i].districtcode.toString().substring(0, 4) == selectvalue) {
                            //遍历后台传回的结果，一项项往select中添加option
                            select_county.options.add(new Option(datares.data2[i].districtname, datares.data2[i].districtcode));
                        }
                    }
                }
                $("#select_village").find("option").remove();
                var select_village = document.getElementById("select_village");
                select_village.options.add(new Option("请选择", "-1"));

                $("#select_hamlet").find("option").remove();
                var select_hamlet = document.getElementById("select_hamlet");
                select_hamlet.options.add(new Option("请选择", "-1"));
            });
            $("#select_county").on('change', function () {
                districtcode = $(this).find('option:selected').val();
                level = "county";
                var selectvalue = $(this).find('option:selected').val();
                $("#select_village").find("option").remove();
                selectvalue = selectvalue.substring(0, 6);
                var select_village = document.getElementById("select_village");
                select_village.options.add(new Option("请选择", "-1"));
                if ($('#modalselect_adminlevel').find('option:selected').text() != "县级") {
                    for (var i = 0; i < datares.data3.length; i++) {
                        if (datares.data3[i].districtcode.toString().substring(0, 6) == selectvalue) {
                            //遍历后台传回的结果，一项项往select中添加option
                            select_village.options.add(new Option(datares.data3[i].districtname, datares.data3[i].districtcode));
                        }
                    }
                }
                $("#select_hamlet").find("option").remove();
                var select_hamlet = document.getElementById("select_hamlet");
                select_hamlet.options.add(new Option("请选择", "-1"));
            });
            $("#select_village").on('change', function () {
                districtcode = $(this).find('option:selected').val();
                level = "village";
                var selectvalue = $(this).find('option:selected').val();
                $("#select_hamlet").find("option").remove();
                selectvalue = selectvalue.substring(0, 9);
                var select_hamlet = document.getElementById("select_hamlet");
                select_hamlet.options.add(new Option("请选择", "-1"));
                if ($('#modalselect_adminlevel').find('option:selected').text() != "乡级") {
                    for (var i = 0; i < datares.data4.length; i++) {
                        if (datares.data4[i].districtcode.toString().substring(0, 9) == selectvalue) {
                            //遍历后台传回的结果，一项项往select中添加option
                            select_hamlet.options.add(new Option(datares.data4[i].districtname, datares.data4[i].districtcode));
                        }
                    }
                }
            });

            $("#select_hamlet").on('change', function () {
                districtcode = $(this).find('option:selected').val();
                level = "hamlet";
            });

            $("#a_getdogstalist").click(function () {
                var senddata = {};
                var necid = null;
                if($("#input_neckletid").val()!=null && $("#input_neckletid").val()!="" && $("#input_neckletid").val()!="请选择项圈"){
                    necid = $("#input_neckletid").val();
                    necnum = necid.split("|").length == 1?1:necid.split("|").length-1;
                }else{
                    alert("未选择项圈！");
                    necnum = 0;
                    posnum = 0;
                    return;
                }
                var begintime = $("#input_begintime").val()+":00";
                var endtime = $("#input_endtime").val()+":00";
                senddata.districtcode = districtcode;
                senddata.level = level;
                senddata.begintime = begintime;
                senddata.endtime = endtime;
                senddata.necid = necid;
                $.ajax({
                    url: "/aidog/api/getneclnglatlist",
                    type: "POST",
                    data: senddata,
                    beforeSend: function (request) {
                        request.setRequestHeader("token", window.localStorage.getItem("aidog_token"));
                    },
                    success: function (data) {
                        if (data.success) {
                            drawMap(data.data.lnglatlist);
                            posnum = data.data.lnglatlist.length;
                        }
                        else {
                            return;
                        }
                    }
                })
            });

            $("#btn_neckletlist").click(function () {
                var senddata = {};
                senddata.startitem = 1;
                senddata.pagesize = 100000;
                senddata.districtcode = districtcode;
                senddata.level = level;
                $.ajax({
                    url: "/aidog/api/getdoglist",
                    type: "POST",
                    data: senddata,
                    beforeSend: function (request) {
                        request.setRequestHeader("token", window.localStorage.getItem("aidog_token"));
                    },
                    success: function (data) {
                        if (data.data.data == null) {
                            alert(data.data.msg);
                            return;
                        }
                        else {
//                            var select_necklet = document.getElementById("select_necklet");
                            viewdata = $.extend(true,[],data.data.data);
                            for(var i = viewdata.length-1;i>=0;i--){
//                                if(data.data.data[i].necId!="-1"){
//                                    //遍历后台传回的结果，一项项往select中添加option
//                                    select_necklet.options.add(new Option(data.data.data[i].necId, data.data.data[i].dogId));

//                                }
                                viewdata[i].check = "<input name='check' id='\""+viewdata[i].necId+"\"' class=\"checkbox neccheck\" type=\"checkbox\" />";
                                if(viewdata[i].necId == "-1"){
                                    viewdata.splice(i,1);
                                }
                            }
                        }
                    }
                })

                $("#doglist").modal('show');
                $("#doglist").on("shown.bs.modal",function(){
                    var dt = $('#datatable').DataTable({
                        data: viewdata,
                        "jQueryUI": true,
                        'paging'      : true,
                        lengthMenu: [　//显示几条数据设置
                            [10, 20,30, 50,-1],
                            ['10 条', '20 条','30条', '50 条','全部']
                        ],
                        'searching'   : true,
                        'ordering'    : true,
                        "pageLength": 10, //每行显示记录数
                        'info'        : true,
                        'bAutoWidth'  : false,
                        "responsive": false,
                        //允许重建
                        "destroy": true,
                        "scrollX":true,
                        "oLanguage": {
                            buttons: {
                                pageLength: {
                                    _: "每页%d条记录",
                                    '-1': "显示所有记录"
                                }
                            },
                            "sLengthMenu": "每页显示 _MENU_ 条记录",
                            "sZeroRecords": "暂无数据",
                            "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
                            "sInfoEmtpy": "暂无数据",
                            "sInfoFiltered": "数据表中共为 _MAX_ 条记录)",
                            "sProcessing": "正在加载中",
                            "sSearch": "搜索",
                            "sUrl": "",
                            "oPaginate": {
                                "sFirst": "第一页",
                                "sPrevious": " 上一页 ",
                                "sNext": " 下一页 ",
                                "sLast": " 最后一页 "
                            }
                        },
                        "scrollY": "200px",
                        "dom": 'Bfrtip',
                        "processing": true,
                        "columns": [
                            {
                                "class":          "details-control",
                                "orderable":      false,
                                "data":           "check",
                                "defaultContent": "",
                                "width": "1px"
                            },
                            { "data": "ownerName","width":"60px" },
                            { "data": "dogName","width":"60px"  },
                            { "data": "dogGovcode","width":"70px"  },
                            { "data": "necId","width":"70px"}
                        ]
                    });
                });

            });

            //页面上点击此属性，将当前页的列表数据全部选中
            $('.select-all').on('click', function () {
                if (this.checked) {
                    $('.checkbox.neccheck').each(function () {
                        this.checked = true;
                    });
                } else {
                    $('.checkbox.neccheck').each(function () {
                        this.checked = false;
                    });
                }
            });

            $("#btn_stanum").click(function () {
                alert("项圈数量： "+ necnum + "\r" + "位置总数： "+ posnum);
            });

        });

        function drawMap(datares) {
            var lines = [];
            var info = [];
            for (var i = 0; i < datares.length; i++) {
                var datatemp = [];
//                datatemp.push(datares[i].lng + "," + datares[i].lat);
                datatemp.push(datares[i].lng);
                datatemp.push(datares[i].lat);
                lines.push(datatemp);
                var infotemp = [];
                infotemp.push(datares[i].deviceId);
                infotemp.push(timetrans(datares[i].realtime));
                info.push(infotemp);
            }
//            var lines = [[119.320984,26.114944],[119.321625,26.114672],[119.322021,26.1145],[119.323074,26.114027],[119.323334,26.113916],[119.323517,26.113832],[119.323677,26.113785],[119.324203,26.113729],[119.325081,26.113186],[119.326263,26.112509],[119.326401,26.112431],[119.326767,26.112226],[119.327385,26.111908],[119.327988,26.111593],[119.328064,26.111557],[119.328125,26.111528],[119.328468,26.111353],[119.32888,26.111137],[119.32933,26.110861],[119.329994,26.110491],[119.329994,26.110491],[119.333496,26.108803],[119.333817,26.108654],[119.334602,26.108278],[119.335197,26.108042],[119.336487,26.107555],[119.337173,26.107304],[119.338913,26.106703],[119.339539,26.10652],[119.341751,26.105846],[119.343102,26.105564],[119.344704,26.105255],[119.345505,26.105146],[119.346436,26.105053],[119.347351,26.104986],[119.34938,26.104881],[119.349571,26.10487],[119.351616,26.104763],[119.355225,26.104622],[119.355469,26.104614],[119.356247,26.104578],[119.356949,26.104549],[119.358017,26.104498],[119.358017,26.104498],[119.358864,26.104652],[119.360641,26.104567],[119.361626,26.104454],[119.362305,26.104336],[119.362801,26.104214],[119.363441,26.104023],[119.363899,26.103863],[119.364563,26.103584],[119.3647,26.103516],[119.364906,26.103411],[119.365402,26.103142],[119.366051,26.102726],[119.366486,26.102404],[119.367043,26.101931],[119.367615,26.101362],[119.367859,26.101089],[119.368256,26.100573],[119.368507,26.100231],[119.368851,26.099644],[119.36911,26.099131],[119.369354,26.098568],[119.369583,26.097878],[119.36969,26.097458],[119.369812,26.096727],[119.369881,26.095911],[119.369896,26.09553],[119.369919,26.092951],[119.369919,26.092527],[119.369919,26.092136],[119.369926,26.091362],[119.369949,26.086111],[119.369957,26.085209],[119.369957,26.084763],[119.369965,26.082253],[119.369972,26.081539],[119.369972,26.081266],[119.369972,26.080341],[119.36998,26.079367],[119.370071,26.077808],[119.370232,26.076271],[119.370361,26.075396],[119.370461,26.074762],[119.370537,26.074358],[119.370613,26.073954],[119.371117,26.071484],[119.371315,26.070555],[119.371384,26.070133],[119.37149,26.069557],[119.371559,26.068897],[119.371567,26.068607],[119.371574,26.06802],[119.371574,26.067869],[119.371483,26.066771],[119.371414,26.066212],[119.371307,26.065559],[119.371117,26.064873],[119.370819,26.063919],[119.370613,26.06337],[119.370468,26.063042],[119.37011,26.062248],[119.369278,26.06053],[119.369019,26.059982],[119.36882,26.05957],[119.368652,26.059214],[119.368279,26.05843],[119.36792,26.057695],[119.367538,26.056898],[119.367172,26.056129],[119.366913,26.055565],[119.366714,26.055035],[119.36657,26.054626],[119.36647,26.054298],[119.366302,26.053625],[119.366264,26.053415],[119.36615,26.052691],[119.366104,26.051962],[119.366104,26.051098],[119.366142,26.050673],[119.366203,26.050205],[119.366341,26.04948],[119.366592,26.04858],[119.366631,26.04846],[119.366875,26.047796],[119.367271,26.046988],[119.367592,26.046436],[119.36821,26.045525],[119.368874,26.044762],[119.370125,26.043377],[119.372154,26.041185],[119.37291,26.040373],[119.373146,26.040117],[119.373146,26.040117],[119.374969,26.038164],[119.375504,26.037596],[119.376793,26.036194],[119.377441,26.035456],[119.377487,26.035408],[119.377846,26.034935],[119.37867,26.033829],[119.37867,26.033829],[119.379295,26.032831],[119.379929,26.031794],[119.380089,26.031481],[119.380257,26.031225],[119.380486,26.030884],[119.380745,26.030569],[119.380745,26.030569],[119.381149,26.029873],[119.381233,26.029699],[119.38131,26.029518],[119.381348,26.029413],[119.381386,26.02927],[119.381439,26.029066],[119.381439,26.029066],[119.381454,26.02878],[119.381454,26.02857],[119.381447,26.028442],[119.381416,26.028177],[119.381363,26.02796],[119.381317,26.027834],[119.381218,26.027592],[119.381157,26.02747],[119.381058,26.027296],[119.380554,26.026611],[119.380508,26.026541],[119.380165,26.026003],[119.379929,26.025639],[119.379181,26.024523],[119.377815,26.022472],[119.377441,26.02191],[119.375732,26.019318],[119.375732,26.019318],[119.375366,26.01897],[119.375092,26.018629],[119.374504,26.017813],[119.373886,26.01688],[119.373238,26.015915],[119.373085,26.015724],[119.372986,26.015625],[119.372711,26.015343],[119.372314,26.014936],[119.372017,26.014641],[119.371185,26.013321],[119.370148,26.011971],[119.369919,26.011694],[119.369576,26.011311],[119.366928,26.008556],[119.366623,26.008251],[119.364761,26.006342],[119.363914,26.005487],[119.363678,26.00526],[119.363327,26.004965],[119.362877,26.004635],[119.362595,26.004431],[119.362175,26.004202],[119.361908,26.00403],[119.361565,26.003729],[119.361397,26.003611],[119.36129,26.003538],[119.360886,26.003334],[119.36026,26.002977],[119.360062,26.002838],[119.359848,26.002682],[119.359322,26.002249],[119.358002,26.00102],[119.357521,26.000587],[119.356766,25.999945],[119.356766,25.999945],[119.356537,25.999613],[119.356445,25.999357],[119.356445,25.999357],[119.356827,25.99902],[119.357407,25.99852],[119.358246,25.997782],[119.358482,25.997581],[119.358597,25.997473],[119.35894,25.997177],[119.359093,25.997053],[119.359352,25.996819],[119.361298,25.995127],[119.362106,25.994423],[119.362717,25.993893],[119.363022,25.99365],[119.363144,25.993561],[119.363487,25.993265],[119.363609,25.993156],[119.363953,25.992868],[119.364265,25.992573],[119.365234,25.991722],[119.365509,25.991507],[119.365746,25.991348],[119.366013,25.991198],[119.366295,25.991062],[119.36647,25.990993],[119.366966,25.990879],[119.367348,25.990847],[119.367668,25.990816],[119.36837,25.990807],[119.36898,25.990768],[119.369461,25.990721],[119.370193,25.990601],[119.370552,25.990511],[119.371117,25.990347],[119.371559,25.99021],[119.371941,25.990061],[119.372322,25.989862],[119.372475,25.989758],[119.372635,25.989622],[119.372757,25.989492],[119.373001,25.989159],[119.373596,25.988394],[119.37384,25.988073],[119.374115,25.987631],[119.374161,25.987556],[119.374374,25.987236],[119.37442,25.987186],[119.37487,25.98658],[119.375046,25.986347],[119.375229,25.986094],[119.375359,25.98592],[119.37558,25.985609],[119.375977,25.985008],[119.376495,25.984127],[119.376892,25.983429],[119.377335,25.982664],[119.377441,25.982483],[119.377792,25.981894],[119.378403,25.980921],[119.378624,25.980619],[119.37883,25.9804],[119.379181,25.980032],[119.379318,25.979918],[119.37957,25.979696],[119.379761,25.979778],[119.379761,25.979778],[119.379921,25.97987],[119.380066,25.979927],[119.380234,25.979979],[119.380394,25.980005],[119.383568,25.980373],[119.384087,25.980469],[119.384338,25.980524],[119.384575,25.980564],[119.384865,25.980595],[119.385078,25.980581],[119.385429,25.980516],[119.38559,25.980459],[119.38578,25.980364],[119.386429,25.979914],[119.386566,25.979849],[119.386719,25.979799],[119.386818,25.979782],[119.386948,25.979778],[119.387085,25.979799],[119.387184,25.979832],[119.387268,25.979887],[119.387352,25.979944],[119.387421,25.980032],[119.387466,25.980118],[119.38752,25.980236],[119.387535,25.98037],[119.387558,25.980595],[119.38752,25.980915],[119.38752,25.980915],[119.38755,25.980965],[119.387482,25.981503],[119.387367,25.982195],[119.38726,25.982664],[119.387215,25.98292],[119.387253,25.983097],[119.387299,25.983206],[119.387352,25.983282],[119.387451,25.98337],[119.38755,25.983425],[119.387695,25.983488],[119.388496,25.983738],[119.389076,25.983925],[119.389168,25.983967],[119.389244,25.984026],[119.389328,25.984102],[119.389381,25.984175],[119.389412,25.984285],[119.389412,25.984381],[119.389351,25.984562],[119.389137,25.985168],[119.389137,25.985168],[119.389198,25.985291],[119.389191,25.98531],[119.389191,25.98531],[119.389008,25.985802],[119.388931,25.986002],[119.388855,25.986124],[119.388741,25.986307],[119.388596,25.986429],[119.388443,25.986521],[119.388214,25.986534],[119.387833,25.986511],[119.387367,25.986488],[119.386711,25.986521],[119.38662,25.98654],[119.386429,25.986631],[119.386429,25.986631],[119.386192,25.987564],[119.386108,25.988043],[119.386055,25.98827],[119.385902,25.98908],[119.385818,25.98954],[119.385818,25.98954],[119.385704,25.989531],[119.385735,25.989401],[119.385788,25.989061],[119.38607,25.987574],[119.386284,25.986631],[119.386642,25.984758],[119.386528,25.984753],[119.386528,25.984753],[119.386108,25.984732],[119.384872,25.98468],[119.384789,25.984695],[119.384071,25.985096],[119.383965,25.985142],[119.383965,25.985142],[119.383888,25.985178],[119.383537,25.985214],[119.381973,25.985123],[119.381912,25.985123],[119.380051,25.984955],[119.379921,25.984945],[119.378365,25.984827],[119.377441,25.984753],[119.376381,25.984667],[119.376381,25.984667],[119.376038,25.985222],[119.375732,25.985678],[119.375259,25.986328],[119.375015,25.98661],[119.37455,25.987244],[119.374466,25.987354],[119.374283,25.987617],[119.374237,25.987692],[119.373962,25.988096],[119.37368,25.988441],[119.372787,25.989622],[119.372505,25.989901],[119.372284,25.990053],[119.372284,25.990053],[119.371964,25.99021],[119.371643,25.99033],[119.371109,25.990496],[119.370522,25.99065],[119.37014,25.990738],[119.369553,25.990833],[119.368637,25.990925],[119.368187,25.990946],[119.367386,25.990946],[119.366943,25.990997],[119.366508,25.991112],[119.366272,25.991194],[119.365929,25.991354],[119.365746,25.991467],[119.365318,25.9918],[119.364326,25.992668],[119.363876,25.993073],[119.363556,25.993351],[119.363213,25.99365],[119.363182,25.993671],[119.362816,25.993988],[119.362206,25.994518],[119.36145,25.995173],[119.360344,25.996134],[119.359894,25.99654],[119.35965,25.99678],[119.359497,25.996904],[119.359337,25.997053],[119.359108,25.99724],[119.358711,25.997591],[119.358383,25.997883],[119.358162,25.998083],[119.357208,25.998924],[119.357056,25.999054],[119.357056,25.999054],[119.356995,25.999249],[119.356941,25.999439],[119.35688,25.999765],[119.357086,26.000053],[119.357323,26.000292],[119.357597,26.000528],[119.359367,26.002171],[119.359634,26.002405],[119.360107,26.002773],[119.360619,26.003092],[119.361328,26.003468],[119.361984,26.003738],[119.361984,26.003738],[119.362373,26.003872],[119.362732,26.003962],[119.362862,26.003975],[119.363342,26.004311],[119.363686,26.004581],[119.363754,26.004635],[119.364052,26.004904],[119.365776,26.006615],[119.366432,26.007275],[119.367004,26.00786],[119.367073,26.007933],[119.36927,26.010168],[119.370667,26.011572],[119.372231,26.013489],[119.37278,26.014217],[119.373283,26.015022],[119.373665,26.015591],[119.37368,26.015625],[119.374321,26.016598],[119.375069,26.017729],[119.375717,26.018845],[119.375824,26.019085],[119.375877,26.019279],[119.377441,26.021631],[119.37793,26.02236],[119.379295,26.024418],[119.379929,26.02537],[119.380295,26.025928],[119.380447,26.026165],[119.380585,26.026402],[119.380714,26.026588],[119.380722,26.026611],[119.380829,26.026772],[119.380829,26.026772],[119.381432,26.027369],[119.381668,26.027552],[119.381958,26.027727],[119.382256,26.027864],[119.382462,26.027937],[119.38269,26.028015],[119.382935,26.028069],[119.383217,26.028111],[119.383492,26.028137],[119.383812,26.028143],[119.384552,26.028111],[119.385262,26.028051],[119.385483,26.028051],[119.385735,26.028055],[119.386154,26.028028],[119.386772,26.028025],[119.387428,26.028069],[119.388306,26.02816],[119.389198,26.028282],[119.390053,26.028433],[119.391167,26.028675],[119.391609,26.02878],[119.392097,26.028906],[119.392952,26.029158],[119.393295,26.029259],[119.394012,26.029509],[119.394516,26.029686],[119.394516,26.029686],[119.395821,26.030222],[119.396477,26.030525],[119.397484,26.031025],[119.398613,26.031618],[119.399414,26.032032],[119.399696,26.032177],[119.400459,26.032509],[119.401421,26.032818],[119.401604,26.032869],[119.402061,26.032974],[119.402237,26.033009],[119.402756,26.033077],[119.403145,26.033112],[119.403801,26.033138],[119.405083,26.033091],[119.406158,26.032995],[119.406525,26.032942],[119.407654,26.032864],[119.409256,26.032791],[119.411331,26.032801],[119.412888,26.032843],[119.414001,26.032804],[119.414864,26.032734],[119.41581,26.0326],[119.416092,26.032551],[119.416763,26.032417],[119.417046,26.032345],[119.41803,26.03207],[119.418701,26.031839],[119.419243,26.031631],[119.420296,26.031164],[119.421387,26.030655],[119.42321,26.029781],[119.423584,26.02961],[119.423584,26.02961],[119.426559,26.028191],[119.427422,26.027714],[119.427734,26.027527],[119.42823,26.027182],[119.42865,26.026867],[119.428947,26.026611],[119.429214,26.026381],[119.429657,26.025961],[119.429947,26.025639],[119.430214,26.025324],[119.430725,26.024652],[119.431061,26.024132],[119.431236,26.023821],[119.431511,26.023289],[119.431847,26.022482],[119.43203,26.021963],[119.432442,26.020515],[119.432816,26.019207],[119.433281,26.017664],[119.433456,26.017153],[119.43367,26.016615],[119.433983,26.015928],[119.434143,26.015625],[119.434181,26.01557],[119.434456,26.015139],[119.434708,26.014778],[119.43515,26.014223],[119.435432,26.013863],[119.435608,26.013693],[119.435608,26.013693],[119.435989,26.013321],[119.436501,26.012899],[119.437202,26.012335],[119.437752,26.011923],[119.438057,26.011694],[119.439194,26.010933],[119.440018,26.010317],[119.441856,26.009022],[119.44249,26.008585],[119.443024,26.008207],[119.443024,26.008207],[119.443359,26.007978],[119.445084,26.006767],[119.445892,26.006224],[119.446579,26.005806],[119.447212,26.005465],[119.448288,26.004965],[119.44899,26.004683],[119.449127,26.004635],[119.449867,26.004389],[119.45047,26.004217],[119.451149,26.004053],[119.451706,26.003944],[119.452309,26.003849],[119.453094,26.003757],[119.453644,26.003716],[119.454498,26.003675],[119.45713,26.003658],[119.457733,26.003633],[119.458267,26.003584],[119.458549,26.003559],[119.459511,26.00342],[119.46032,26.00326],[119.460823,26.003134],[119.461769,26.002865],[119.462883,26.002535],[119.463997,26.002195],[119.463997,26.002195],[119.464577,26.001831],[119.464851,26.001637],[119.465096,26.00144],[119.465279,26.001257],[119.465332,26.001202],[119.465508,26.000994],[119.465736,26.000683],[119.465927,26.000292],[119.466034,26.000059],[119.466316,25.99917],[119.466415,25.99892],[119.466476,25.998857],[119.466576,25.998516],[119.466675,25.998169],[119.466782,25.997847],[119.466881,25.997519],[119.46698,25.99724],[119.467064,25.996962],[119.467316,25.996189],[119.468132,25.99365],[119.468346,25.99299],[119.468628,25.992228],[119.468872,25.991671],[119.469086,25.99128],[119.469261,25.990965],[119.469666,25.990417],[119.470078,25.989941],[119.47049,25.989517],[119.471184,25.98892],[119.471771,25.988428],[119.476273,25.98461],[119.476639,25.984314],[119.478027,25.983177],[119.47863,25.982664],[119.480179,25.981325],[119.48098,25.980642],[119.481483,25.980261],[119.482033,25.979927],[119.482513,25.979691],[119.483017,25.979488],[119.483795,25.97924],[119.485184,25.979084],[119.485718,25.979036],[119.486481,25.978992],[119.487068,25.978958],[119.487305,25.978943],[119.487907,25.978916],[119.488861,25.978821],[119.489441,25.978733],[119.49025,25.978598],[119.490807,25.978472],[119.491669,25.97823],[119.492661,25.977892],[119.49305,25.977737],[119.493584,25.977509],[119.494118,25.977245],[119.495186,25.976627],[119.495911,25.976151],[119.496834,25.97546],[119.498459,25.974194],[119.498848,25.973915],[119.499229,25.973652],[119.499947,25.973202],[119.500305,25.973005],[119.500824,25.972733],[119.501411,25.972477],[119.501846,25.9723],[119.502731,25.971991],[119.503342,25.97183],[119.503975,25.971689],[119.504028,25.97168],[119.504417,25.971598],[119.504692,25.971558],[119.505692,25.971458],[119.506256,25.971416],[119.50666,25.971397],[119.50927,25.971354],[119.512505,25.971306],[119.513725,25.971262],[119.514503,25.971193],[119.515182,25.971107],[119.516304,25.970911],[119.517143,25.970686],[119.518204,25.970343],[119.519257,25.96991],[119.520195,25.969421],[119.520828,25.969053],[119.521225,25.968794],[119.521965,25.968256],[119.522392,25.967911],[119.522995,25.967369],[119.523491,25.966894],[119.524963,25.965378],[119.528961,25.961161],[119.529404,25.96069],[119.531006,25.959002],[119.531189,25.958815],[119.53125,25.958767],[119.531776,25.958279],[119.532661,25.957541],[119.533211,25.957109],[119.533646,25.956814],[119.534508,25.956257],[119.535049,25.955956],[119.535492,25.955711],[119.536278,25.955347],[119.536987,25.95504],[119.538033,25.954653],[119.538834,25.954395],[119.538834,25.954395],[119.539528,25.954214],[119.5401,25.954088],[119.541245,25.953888],[119.542488,25.953747],[119.543221,25.953707],[119.544067,25.953707],[119.544975,25.953733],[119.545517,25.953772],[119.546577,25.953894],[119.547081,25.953972],[119.548836,25.954308],[119.549744,25.954485],[119.550331,25.954592],[119.550987,25.954691],[119.551971,25.954796],[119.552887,25.954844],[119.553215,25.954844],[119.553802,25.95484],[119.554718,25.954796],[119.55574,25.954679],[119.556999,25.954453],[119.557777,25.954268],[119.558327,25.954102],[119.558807,25.953941],[119.559731,25.953608],[119.560402,25.953316],[119.562286,25.952396],[119.565765,25.950655],[119.567085,25.950008],[119.567719,25.949705],[119.568344,25.949389],[119.569336,25.948906],[119.570572,25.948278],[119.571548,25.947796],[119.572304,25.947409],[119.573532,25.946753],[119.573914,25.946535],[119.574593,25.946152],[119.575188,25.945803],[119.575272,25.945755],[119.575722,25.945499],[119.576157,25.945246],[119.576439,25.945091],[119.579651,25.943129],[119.580063,25.942886],[119.585594,25.939535],[119.586174,25.93918],[119.586922,25.938721],[119.590889,25.936333],[119.59182,25.935751],[119.593002,25.934956],[119.594437,25.933929],[119.595154,25.933359],[119.596092,25.932587],[119.596779,25.931986],[119.597168,25.931627],[119.598053,25.930794],[119.599388,25.929445],[119.601082,25.927732],[119.601707,25.927105],[119.602699,25.926151],[119.603638,25.92536],[119.604446,25.924757],[119.605331,25.924154],[119.606468,25.923489],[119.607216,25.923098],[119.608078,25.922695],[119.6092,25.922245],[119.610176,25.921885],[119.611305,25.921516],[119.611977,25.921289],[119.613335,25.920834],[119.614754,25.920338],[119.615807,25.919931],[119.616913,25.919472],[119.617691,25.919125],[119.619141,25.918407],[119.619148,25.918402],[119.619743,25.918098],[119.620277,25.917814],[119.621185,25.917286],[119.622108,25.916744],[119.622421,25.916563],[119.622757,25.916348],[119.624275,25.915396],[119.626579,25.913948],[119.62735,25.913467],[119.627701,25.913269],[119.628311,25.912882],[119.628548,25.912737],[119.62944,25.912201],[119.629936,25.911884],[119.630905,25.91128],[119.631233,25.911093],[119.631828,25.910782],[119.632721,25.910347],[119.633354,25.910074],[119.634026,25.909809],[119.635521,25.909313],[119.636017,25.909184],[119.637726,25.908779],[119.638924,25.908581],[119.639656,25.908503],[119.640488,25.908424],[119.640907,25.908398],[119.641113,25.908382],[119.643097,25.908255],[119.643097,25.908255],[119.644455,25.908186],[119.646339,25.908083],[119.648407,25.907942],[119.650589,25.907831],[119.652275,25.907738],[119.655975,25.907539],[119.659294,25.907335],[119.660759,25.907326],[119.661552,25.907417],[119.66214,25.907539],[119.662392,25.907618],[119.662621,25.907696],[119.663086,25.9079],[119.663208,25.907961],[119.66375,25.908281],[119.664009,25.908466],[119.664291,25.908733],[119.664864,25.909288],[119.66494,25.909395],[119.66523,25.909805],[119.665504,25.910255],[119.666534,25.912163],[119.667305,25.913515],[119.669121,25.916744],[119.671227,25.920473],[119.671494,25.920902],[119.67173,25.921244],[119.672447,25.922171],[119.672775,25.922678],[119.6735,25.923967],[119.672928,25.924257],[119.672928,25.924257],[119.672607,25.924404],[119.671715,25.924809],[119.671715,25.924809],[119.672157,25.925533],[119.672157,25.925533],[119.671669,25.92577],[119.671669,25.92577],[119.671852,25.926062],[119.671936,25.926224],[119.672035,25.926394],[119.672134,25.926561],[119.672279,25.926798],[119.672409,25.927036],[119.672409,25.927036],[119.671982,25.9272],[119.671982,25.9272],[119.672211,25.927631]]
            var map = new AMap.Map('statsChart', {resizeEnable: true, zoom: 4});
            var markers = []; //province见Demo引用的JS文件
            for (var i = 0; i < lines.length; i += 1) {
                var marker;
                var icon = new AMap.Icon({
//                    image: 'https://vdata.amap.com/icons/b18/1/2.png',
                    image: '../../../img/3.png',
                    size: new AMap.Size(24, 24)
                });
                marker = new AMap.Marker({
                    icon: icon,
                    position: lines[i],
                    offset: new AMap.Pixel(-12, -12),
                    zIndex: 101,
                    title: JSON.stringify(info[i]),
                    map: map
                });

                markers.push(marker);
            }
            map.setFitView();
        }

        function timetrans(date){
//    var date = new Date(date*1000);//如果date为13位不需要乘1000
            var date = new Date(date);
            var Y = date.getFullYear() + '-';
            var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
            var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + 'T';
            var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
            var m = (date.getMinutes() <10 ? '0' + date.getMinutes() : date.getMinutes());
//            var m = (date.getMinutes() <10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
//            var s = (date.getSeconds() <10 ? '0' + date.getSeconds() : date.getSeconds());
//            return Y+M+D+h+m+s;
            return Y+M+D+h+m;
        }

        function choosedog() {
            var neccheck = $('.neccheck');
            var arr = []
            var spanarr = "";
            neccheck.map(function(item){
                if(neccheck[item].checked){
                    arr.push(neccheck[item].id);
                    spanarr += neccheck[item].id +"|";
                }
            })
            spanarr = spanarr.replace(/\"/g, "");
            $("#input_neckletid").val(spanarr);
            $("#doglist").modal('hide');
        }
    </script>
    <script type="text/javascript" src="https://webapi.amap.com/demos/js/liteToolbar.js"></script>
</body>
</html>